
import { defAxios as request } from "@/utils/http/index.js";

/**
 * 用户管理中使用的接口定义
 *
 * @returns {Object} api定义
 */
export function useManageApi() {
    return {
        userSave(params) {
            return request({
                url: '/user/save',
                method: 'post',
                data: params
            })
        },
        userDelete(params) {
            return request({
                url: '/user/delete',
                method: 'post',
                data: params
            })
        },
        userUpdateStatus(params) {
            return request({
                url: '/user/updateStatus',
                method: 'post',
                data: params
            })
        },
        userModifyPassword(params) {
            return request({
                url: '/user/modifyPassword',
                method: 'post',
                data: params
            })
        },
        userResetPassword(params) {
            return request({
                url: '/user/resetPassword',
                method: 'post',
                data: params
            })
        },
        getUserRoleAgInfo(guid) {
            return request({
                url: `/user/getRoleAgInfo/${guid}`,
                method: 'get',
            })
        }
    }
}
